package autoorder.zsxmlv.po;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

public class Goods {
    private Integer id;

    private String goodsId;

    private String goodsName;

    private Integer shopId;

    private String goodsPic;

    private BigDecimal goodsPrice;

    private BigDecimal freight;

    private Integer limit;

    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId == null ? null : goodsId.trim();
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName == null ? null : goodsName.trim();
    }

    public Integer getShopId() {
        return shopId;
    }

    public void setShopId(Integer shopId) {
        this.shopId = shopId;
    }

    public BigDecimal getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(BigDecimal goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public BigDecimal getFreight() {
        return freight;
    }

    public void setFreight(BigDecimal freight) {
        this.freight = freight;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getGoodsPic() {
        return goodsPic;
    }

    public void setGoodsPic(String goodsPic) {
        this.goodsPic = goodsPic;
    }

    public Goods() {
    }

    public Goods(String goodsId, String goodsName, Integer shopId, String goodsPic, BigDecimal goodsPrice, BigDecimal freight, Integer limit, Integer status, Date createTime, Date updateTime) {
        this.goodsId = goodsId;
        this.goodsName = goodsName;
        this.shopId = shopId;
        this.goodsPic = goodsPic;
        this.goodsPrice = goodsPrice;
        this.freight = freight;
        this.limit = limit;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public Goods(Integer id, String goodsId, String goodsName, Integer shopId, String goodsPic, BigDecimal goodsPrice, BigDecimal freight, Integer limit, Integer status, Date createTime, Date updateTime) {
        this.id = id;
        this.goodsId = goodsId;
        this.goodsName = goodsName;
        this.shopId = shopId;
        this.goodsPic = goodsPic;
        this.goodsPrice = goodsPrice;
        this.freight = freight;
        this.limit = limit;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Goods goods = (Goods) o;
        return Objects.equals(goodsId, goods.goodsId);
    }

    @Override
    public int hashCode() {

        return Objects.hash(goodsId);
    }

    @Override
    public String toString() {
        return "Goods{" +
                "id=" + id +
                ", goodsId='" + goodsId + '\'' +
                ", goodsName='" + goodsName + '\'' +
                ", shopId=" + shopId +
                ", goodsPic='" + goodsPic + '\'' +
                ", goodsPrice=" + goodsPrice +
                ", freight=" + freight +
                ", limit=" + limit +
                ", status=" + status +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}